<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:g="http://giavacms.org/base" 
	template="/WEB-INF/layout/popupC3.xhtml">

	<ui:define name="title">
		<h:outputText value="Lista Immagini" />
	</ui:define>
	<ui:define name="content">
	<style>
		.pager {
			text-decoration: none;
			border: 1px solid #000099;
			color: #000099;
			padding: 2px;
		}
		.selected {
			text-decoration: none;
			border: 1px solid #000099;
			color: #000099;
			background-color: white;
			padding: 2px;
		}
	</style>
	
		<h:form prependId="false">

			<div id="doc" class="yui-t7">
				<center>
				<br/>
				<p:panel header="Scegli una immagine con un click!" id="images"
					style="width: 450px;">
					<h:inputText value="#{resourceController.imgsearch.obj.name}"/>
					<h:commandButton action="#{resourceController.reloadImgModel}" value="Filtra per nome"/>
					<br/>
					<br/>

					<g:uiRepeatPaged id="immagini" showpages="10" label="Immagini disponibili..."
						selectedStyleClass="selected" styleClass="pager"
						model="#{resourceController.imgModel}" width="350px" >

						<p>
							<img src="#{request.contextPath}/img/#{var.nome}"
								width="#{resourceController.proportionalWidth(var.nome,100,100)}"
								height="#{resourceController.proportionalHeight(var.nome,100,100)}"
								style="border: 1px;" />
						</p>

					</g:uiRepeatPaged>

					<div style="clear: both;"></div>
					<br/>
				</p:panel>
					</center>
			</div>
		</h:form>
	</ui:define>
</ui:composition>
